<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/24/024
 * Time: 11:43
 */

namespace App\Validator;


class LotteryRecord extends BaseValidate
{
    protected $rules = [
        'id'=>'required|integer',
	    'user_id'=>'required|integer',
	    'match_id'=>'required|integer',
	    'result'=>'required|array',
        'status'=>'required|integer|in:-1,0,1'
    ];
    protected $messages = [
        'id.required'=>'id参数缺失',
        'id.integer'=>'id参数格式错误',
	    'user_id.required'=>'用户参数缺失',
	    'user_id.integer'=>'用户参数格式错误',
	    'match_id.required'=>'比赛参数缺失',
	    'match_id.integer'=>'比赛参数格式错误',
	    'result.required'=>'推荐结果参数缺失',
	    'result.array'=>'推荐结果参数格式错误',

        'status.required'=>'状态参数缺失',
        'status.integer'=>'状态参数格式错误',
        'status.in'=>'状态参数值错误',

    ];
    protected $scenes = [
        'add'=>['user_id','match_id','result'],
        'edit'=>['user_id','match_id','result','id'],
    ];

}